<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="" content="">
  <title></title>
  <style></style>
</head>

<body>
  <p>ok</p>

  <script>

    function deepclone ( obj = {} ){
      if( typeof obj !== 'object' || obj == null ){ return obj}
      let jg
      if( obj instanceof Array ){ jg = [] }else{ obj = {} }
      for (let k in obj){
        if( obj.hasOwnProperty(k) ){ jg[k] = deepclone( obj[k] )}
      }
      return jg
    }

  </script>
</body>

</html>